'use strict';

/**
 * 学生记录
 */
const mongoose = require('mongoose'), Schema = mongoose.Schema;

const studentRecordsSchema = new Schema({
    
    c_time: { type: Number, required: true }, //抓拍时间，时间戳(秒)
    c_photo: { type: String }, //抓拍照片
    c_photo_name: {type: String}, //抓拍图片名称

    d_id: { type: String }, //抓拍设备id
    d_uuid: { type: String }, //抓拍设备uuid
    d_name: {type: String}, //抓拍设备名称

    s_type: { type: Number }, //识别人类型 1黑名单 2白名单(学生) 3VIP 4陌生人
    s_similarity: {type: String}, //相似度
    s_id: { type: String }, //用户id
    s_name: { type: String}, //名字
    s_sex: { type: Number }, //1:男，2：女
    s_num: { type: String }, //学号
    s_school: { type: String }, //学校
    s_class: { type: String }, //班级
    s_phone: { type: String }, //手机号码
    s_email: { type: String }, //邮箱
    s_address: {type: String }, //地址

    // 抓拍设备所在教室信息
    group_name:{type: String},//集团名称
    campus_name:{type: String},//校区名称
    class_name:{type: String},//班级名称
    classroom_id:{type: String},//教室id
    classroom_name:{type: String},//教室名称
    classroom_num:{type: String},//教室编号
});

module.exports = mongoose.model('StudentRecordsModel', studentRecordsSchema, "record_student");
